package com.itany.boot.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 石小俊
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @RequestMapping("/add")
    public String add(){
        System.out.println("UserController.add");
        return "<h1>Product add</h1>";
    }

    @RequestMapping("/delete")
    public String delete(){
        System.out.println("UserController.delete");
        return "<h1>Product delete</h1>";
    }

    @RequestMapping("/modify")
    public String modify(){
        System.out.println("UserController.modify");
        return "<h1>Product modify</h1>";
    }

    @RequestMapping("/find/{id}")
    public String findById(@PathVariable Integer id){
        System.out.println("UserController.findById");
        return "<h1>Product findById</h1>";
    }

    @RequestMapping("/findAll")
    public String findAll(){
        System.out.println("UserController.findAll");
        return "<h1>Product findAll</h1>";
    }

}
